package com.yunxi.service.localService.activiti.impl;

import com.yunxi.activiti.pojo.ActivitiManageVO;
import com.yunxi.activiti.pojo.ActivitiTaskVO;
import com.yunxi.activiti.pojo.ActivitiVO;
import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.activiti.ActivitiManageMapper;
import com.yunxi.model.activiti.ActivitiManage;
import com.yunxi.service.localService.activiti.ActivitiManageService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 * @author
 * @since 2019-07-15
 */
@Service
public class ActivitiManageServiceImpl extends ServiceImplPlus<ActivitiManageMapper, ActivitiManage> implements ActivitiManageService {

    @Override
    public ActivitiManageVO findNewsDeploymentId(Map map) {
        return baseMapper.findNewsDeploymentId(map);
    }

    @Override
    public ActivitiManageVO getByActivitiCode(String activitiCode) {
        return baseMapper.getByActivitiCode(activitiCode);
    }

    @Override
    public List waitList(Map map) {
        return baseMapper.waitList(map);
    }

    @Override
    public List listRecordByBusinessKey(String businessKey) {
        return baseMapper.listRecordByBusinessKey(businessKey);
    }

    @Override
    public ActivitiTaskVO getCurTaskIdByBusinessKey(String businessKey) {
        ActivitiTaskVO a = baseMapper.getCurTaskIdByBusinessKey(businessKey);
        return a;
    }

    @Override
    public String getInstanceIdByBusinessKey(String businessKey) {
        ActivitiVO a = baseMapper.getInstanceIdByBusinessKey(businessKey);
        if(a!=null)
        return a.getInstanceId();
        return "";
    }

    @Override
    public List<ActivitiTaskVO> listInstanceNodeByBusinessKey(String businessKey) {
        return baseMapper.listInstanceNodeByBusinessKey(businessKey);
    }

    @Override
    public List<ActivitiTaskVO> listInstanceNodeByInstanceId(String instanceId) {
        return baseMapper.listInstanceNodeByInstanceId(instanceId);
    }

    @Override
    public ActivitiTaskVO getTaskByTaskId(String taskId) {
        return baseMapper.getTaskByTaskId(taskId);
    }

    @Override
    public ActivitiTaskVO getHisTaskByTaskId(String taskId) {
        return baseMapper.getHisTaskByTaskId(taskId);
    }
}
